package com.ruoyi.system.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.ruoyi.system.domain.SysBuilding;
import org.apache.ibatis.annotations.Param;

/**
 * 楼Mapper接口
 * 
 * @author ruoyi
 * @date 2024-08-07
 */
public interface SysBuildingMapper 
{
    /**
     * 查询楼
     * 
     * @param buildingId 楼主键
     * @return 楼
     */
    public SysBuilding selectSysBuildingByBuildingId(@Param("buildingId") Long buildingId,
                                                     @Param("beginDate")Date beginDate,
                                                     @Param("endDate")Date endDate
    );

    /**
     * 查询楼列表
     * 
     * @param sysBuilding 楼
     * @return 楼集合
     */
    public List<SysBuilding> selectSysBuildingList(SysBuilding sysBuilding);

    /**
     * 查询所有楼名列表
     *
     * @param sysBuilding 楼
     * @return 楼集合
     */
    public List<SysBuilding> selectAllSysBuildingList(SysBuilding sysBuilding);

    /**
     * 查询总热量
     * @param deptId
     * @param beginDate
     * @param endDate
     * @return
     */
    public BigDecimal selectTotalHeatQuantity(@Param("deptId") Long deptId,@Param("beginDate")Date beginDate,@Param("endDate")Date endDate );
    /**
     * 新增楼
     * 
     * @param sysBuilding 楼
     * @return 结果
     */
    public int insertSysBuilding(SysBuilding sysBuilding);

    /**
     * 修改楼
     * 
     * @param sysBuilding 楼
     * @return 结果
     */
    public int updateSysBuilding(SysBuilding sysBuilding);

    /**
     * 删除楼
     * 
     * @param buildingId 楼主键
     * @return 结果
     */
    public int deleteSysBuildingByBuildingId(Long buildingId);

    /**
     * 批量删除楼
     * 
     * @param buildingIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysBuildingByBuildingIds(Long[] buildingIds);

    /**
     * 删除楼信息
     *
     * @return 结果
     */
    public int deleteSysBuildingByBuildingNo(String buildingNo);

    /**
     * 绑定热费
     * @param housingId
     * @param heatFeeId
     */
    public void bindHeatFeedId(@Param("heatFeeId") Long heatFeeId, @Param("housingId") Long housingId);

    /**
     * 解绑热费
     * @param heatFeeId
     */
    public void restHeatFeedId(@Param("heatFeeId") Long heatFeeId);
}
